﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using java.util;

namespace Game.templates.npc
{
    public class WalkerRoute
    {
        private int _id;
	    private WalkerRouteType _type;
	    private List _points = new ArrayList();
        public WalkerRoute(int id, WalkerRouteType type)
        {
            _id = id;
            _type = type;
        }
        public int getId()
        {
            return _id;
        }

        public WalkerRouteType getType()
        {
            return _type;
        }

        public void addPoint(WalkerRoutePoint route)
        {
            _points.add(route);
        }
        public WalkerRoutePoint getPoint(int id)
        {
            return (WalkerRoutePoint)_points.get(id);
        }

        public int size()
        {
            return _points.size();
        }

        public bool isValid()
        {
            if ((_type == WalkerRouteType.DELETE) || (_type == WalkerRouteType.FINISH))
            {
                return size() > 0;
            }
            return size() > 1;
        }
    }
}
